#include<iostream>
using namespace std;

// 定义结构体时，struct关键字不可以省去
struct Student
{
  string name;
  int age;
  int score;
};

struct Person
{
  int id;
  int age;
  string name;
}person1;


int main() {
  //定义结构体变量时struct关键字可以省去
  Student s1 = {"xl", 32, 100};
  cout << s1.score << endl;
  Student * s = &s1;
  cout << s->age << endl;
  cout << (*s).age << endl;
  person1.age = 30;
  person1.id = 786786868;
  person1.name = "xxxx";
  cout << person1.age << endl;
  Person person2 = {6876868, 32, "jlkj"};
  cout << person2.id << endl;
  return 0;
}